/* 主内容区域样式 */
.main-content {
    flex: 1;
    padding: 32px;
    padding-bottom: 60px; /* 为固定的版本信息留出空间 */
    overflow-y: auto;
    position: relative;
}

.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb {
    background: rgba(0, 191, 255, 0.3);
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 191, 255, 0.5);
}

/* 页面头部 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.page-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #00bfff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* 标题状态栏 */
.header-status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-top: 20px;
    padding: 16px 24px;
    background: rgba(26, 32, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.status-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.status-info-item i {
    font-size: 16px;
    color: rgba(0, 191, 255, 0.8);
    width: 20px;
    text-align: center;
}

.status-info-item .status-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.status-info-item .status-value {
    color: #ffffff;
    font-weight: 600;
}

.status-info-item.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
}

.status-info-item.clickable:hover {
    background: rgba(0, 191, 255, 0.1);
    transform: translateY(-1px);
}

.status-info-item.clickable:hover .status-value {
    color: #00bfff;
}

/* 连通状态指示器 */
.connection-indicator {
    margin-left: 8px;
    display: flex;
    align-items: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #6b7280; /* 默认灰色 */
    transition: all 0.3s ease;
    box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.2);
}

.status-dot.connected {
    background-color: #22c55e; /* 绿色 - 连通 */
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
    animation: pulse-green 2s infinite;
}

.status-dot.disconnected {
    background-color: #ef4444; /* 红色 - 断开 */
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
    animation: pulse-red 2s infinite;
}

.status-dot.testing {
    background-color: #f59e0b; /* 橙色 - 测试中 */
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
    animation: pulse-testing 1s infinite;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
    }
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
    }
}

@keyframes pulse-testing {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
        opacity: 0.6;
    }
}

/* 清除 API 配置按钮 */
.btn-clear-api {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin-left: 8px;
}

.btn-clear-api:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.1);
}

.btn-clear-api:active {
    transform: scale(0.95);
}

.btn-clear-api i {
    margin: 0;
}

/* 卡片样式 */
.card {
    background: rgba(26, 32, 46, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00bfff, #0080ff, #00bfff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 191, 255, 0.2);
    border-color: rgba(0, 191, 255, 0.3);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #00bfff 0%, #0080ff 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 32px rgba(0, 191, 255, 0.3);
}

.card-icon i {
    font-size: 28px;
    color: white;
}

.card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffffff;
}

.card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* 卡片操作按钮组 */
.card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #00bfff 0%, #0080ff 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 191, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 191, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

/* 危险操作小按钮 */
.btn-danger-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-danger-small:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    transform: scale(1.05);
}

.btn-danger-small:active {
    transform: scale(0.95);
}

.btn-danger-small i {
    margin: 0;
}

.btn-primary i, .btn-secondary i {
    margin-right: 8px;
    font-size: 16px;
}

/* 欢迎卡片网格 */
.welcome-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* 状态面板 */
.status-panel {
    background: rgba(26, 32, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
}

.status-panel h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.status-icon.success {
    color: #22c55e;
}

.status-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    flex: 1;
}

.status-value {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

/* 加载占位符 */
.loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
}

.loading-placeholder .loading-spinner {
    text-align: center;
}

.loading-placeholder p {
    margin-top: 16px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
}
